package com.lyy.service.impl;

import com.lyy.service.UserService;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * @author Liangyaoyun
 */
@Service
public class UserServiceImpl implements UserService {

    @Override
    public Map<String, Object> login(String username, String password) {

        // 模拟一个账号 admin/123
        if ("admin".equals(username) && "123".equals(password)) {
            // 模拟一条完整的用户记录
            Map<String, Object> map = new HashMap<>();
            map.put("userId", 1);
            map.put("username", "zhaosi");
            map.put("password", "zhaosi123");
            map.put("nickName", "亚洲舞王");
            map.put("avatarUrl", "赵四.jpg");
            return map;
        }
        return null;
    }
}
